{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys \n",
    "sys.path.append('../scripts/')\n",
    "from dynamic_programming import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "class BeliefDynamicProgramming(DynamicProgramming): ###amdp5\n",
    "    def __init__(self, widths, goal, puddles, time_interval, sampling_num, camera, puddle_coef=100.0, \\\n",
    "                 lowerleft=np.array([-4, -4]).T, upperright=np.array([4, 4]).T, dev_borders=[0.1,0.2,0.4,0.8]): #２行目にcameraを追加\n",
    "        super().__init__(widths, goal, puddles, time_interval, sampling_num, puddle_coef, lowerleft, upperright)\n",
    "        \n",
    "        self.index_nums = np.array([*self.index_nums, len(dev_borders) + 1])\n",
    "        nx, ny, nt, nh = self.index_nums\n",
    "        self.indexes = list(itertools.product(range(nx), range(ny), range(nt), range(nh)))\n",
    "        \n",
    "        self.value_function, self.final_state_flags =  self.init_belief_value_function()\n",
    "        self.policy = np.zeros(np.r_[self.index_nums,2]) \n",
    "        \n",
    "        self.dev_borders = dev_borders\n",
    "        self.dev_borders_side = [dev_borders[0]/10, *dev_borders, dev_borders[-1]*10]\n",
    "        self.motion_sigma_transition_probs = self.init_motion_sigma_transition_probs()\n",
    "        self.obs_sigma_transition_probs = self.init_obs_sigma_transition_probs(camera) #追加\n",
    "\n",
    "    def init_obs_sigma_transition_probs(self, camera):#beliefdp5initobs（observation_updateまで）\n",
    "        probs = {}\n",
    "        for index in self.indexes: \n",
    "            pose = self.pose_min + self.widths*(np.array(index[0:3]).T + 0.5) #セルの中心の座標    \n",
    "            sigma = (self.dev_borders_side[index[3]] + self.dev_borders_side[index[3]+1])/2 #範囲の真ん中の標準偏差を遷移前の状態として使う\n",
    "            S = (sigma**2)*np.eye(3) #sigmaから計算される姿勢の共分散行列\n",
    "\n",
    "            for d in camera.data(pose): #センサ値を繰り返しSに適用\n",
    "                S = self.observation_update(d[1], S, camera, pose)\n",
    "                    \n",
    "            probs[index] = {self.cov_to_index(S):1.0} #遷移後のインデックスをキー、確率1で遷移先を登録\n",
    "\n",
    "        return probs\n",
    "    \n",
    "    def observation_update(self, landmark_id, S, camera, pose):\n",
    "        distance_dev_rate = 0.14  #センサ値の標準偏差のパラメータ。kf.ipynbから持ってくる。\n",
    "        direction_dev = 0.05\n",
    "        \n",
    "        H = matH(pose, camera.map.landmarks[landmark_id].pos)\n",
    "        estimated_z = IdealCamera.observation_function(pose, camera.map.landmarks[landmark_id].pos)\n",
    "        Q = matQ(distance_dev_rate*estimated_z[0], direction_dev)\n",
    "        K = S.dot(H.T).dot(np.linalg.inv(Q + H.dot(S).dot(H.T)))\n",
    "        return (np.eye(3) - K.dot(H)).dot(S)\n",
    "        \n",
    "    def init_motion_sigma_transition_probs(self):\n",
    "        probs = {}\n",
    "        for a in self.actions:\n",
    "            for i in range(len(self.dev_borders)+1):\n",
    "                probs[(i, a)] = self.calc_motion_sigma_transition_probs(self.dev_borders_side[i], self.dev_borders_side[i+1], a)\n",
    "                \n",
    "        return probs\n",
    "            \n",
    "    def cov_to_index(self, cov):\n",
    "        sigma = np.power(np.linalg.det(cov), 1.0/6)\n",
    "        for i, e in enumerate(self.dev_borders):\n",
    "            if sigma < e: return i\n",
    "            \n",
    "        return len(self.dev_borders)\n",
    "        \n",
    "    def calc_motion_sigma_transition_probs(self, min_sigma, max_sigma, action, sampling_num=100):\n",
    "        nu, omega = action\n",
    "        if abs(omega) < 1e-5: omega = 1e-5\n",
    "\n",
    "        F = matF(nu, omega, self.time_interval, 0.0) #ロボットの向きは関係ないので0[deg]で固定で\n",
    "        M = matM(nu, omega, self.time_interval, {\"nn\":0.19, \"no\":0.001, \"on\":0.13, \"oo\":0.2})#移動の誤差モデル（カルマンフィルタのものをコピペ）\n",
    "        A = matA(nu, omega, self.time_interval, 0.0)\n",
    "        \n",
    "        ans = {}\n",
    "        for sigma in np.linspace(min_sigma, max_sigma*0.999, sampling_num): #遷移前のσを作る（区間内に一様分布していると仮定）\n",
    "            index_after = self.cov_to_index(sigma*sigma*F.dot(F.T) + A.dot(M).dot(A.T)) #遷移後のσのインデックス\n",
    "            ans[index_after] = 1 if index_after not in ans else ans[index_after] + 1 #単にカウントしてるだけ（辞書の初期化もあるのでややこしい）\n",
    "                \n",
    "        for e in ans:\n",
    "            ans[e] /= sampling_num #頻度を確率に\n",
    "\n",
    "        return ans\n",
    "    \n",
    "    def init_belief_value_function(self): \n",
    "        v = np.empty(self.index_nums)\n",
    "        f = np.zeros(self.index_nums) \n",
    "        \n",
    "        for index in self.indexes:\n",
    "            f[index] = self.belief_final_state(np.array(index).T)\n",
    "            v[index] = self.goal.value if f[index] else -100.0\n",
    "                \n",
    "        return v, f\n",
    "        \n",
    "    def belief_final_state(self, index):\n",
    "        x_min, y_min, _ = self.pose_min + self.widths*index[0:3] \n",
    "        x_max, y_max, _ = self.pose_min + self.widths*(index[0:3] + 1) \n",
    "        \n",
    "        corners = [[x_min, y_min, _], [x_min, y_max, _], [x_max, y_min, _], [x_max, y_max, _] ] \n",
    "        return all([self.goal.inside(np.array(c).T) for c in corners ]) and index[3] == 0\n",
    "    \n",
    "    def action_value(self, action, index, out_penalty=True):\n",
    "        value = 0.0\n",
    "        for delta, prob in self.state_transition_probs[(action, index[2])]:\n",
    "            after, out_reward = self.out_correction(np.array(index[0:3]).T + delta)\n",
    "        \n",
    "            reward = - self.time_interval * self.depths[(after[0], after[1])] * self.puddle_coef - self.time_interval + out_reward*out_penalty\n",
    "            for sigma_after, sigma_prob in self.motion_sigma_transition_probs[(index[3], action)].items(): \n",
    "                value += (self.value_function[tuple([*after, sigma_after])] + reward) * prob * sigma_prob \n",
    "\n",
    "        return value"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "puddles = [Puddle((-2, 0), (0, 2), 0.1), Puddle((-0.5, -2), (2.5, 1), 0.1)] ###beliefdp5exec\n",
    "\n",
    "##地図とカメラを作る##\n",
    "m = Map()\n",
    "for ln in [(1,4), (4,1), (-4, 1), (-2, 1)]: m.append_landmark(Landmark(*ln))\n",
    "c = IdealCamera(m)\n",
    "    \n",
    "dp = BeliefDynamicProgramming(np.array([0.2, 0.2, math.pi/18]).T, Goal(-3,-3), puddles, 0.1, 10, c) #カメラを加える"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{(0, 0, 0, 0): {0: 1.0},\n",
       " (0, 0, 0, 1): {1: 1.0},\n",
       " (0, 0, 0, 2): {2: 1.0},\n",
       " (0, 0, 0, 3): {3: 1.0},\n",
       " (0, 0, 0, 4): {4: 1.0},\n",
       " (0, 0, 1, 0): {0: 1.0},\n",
       " (0, 0, 1, 1): {1: 1.0},\n",
       " (0, 0, 1, 2): {1: 1.0},\n",
       " (0, 0, 1, 3): {2: 1.0},\n",
       " (0, 0, 1, 4): {3: 1.0},\n",
       " (0, 0, 2, 0): {0: 1.0},\n",
       " (0, 0, 2, 1): {1: 1.0},\n",
       " (0, 0, 2, 2): {1: 1.0},\n",
       " (0, 0, 2, 3): {2: 1.0},\n",
       " (0, 0, 2, 4): {3: 1.0},\n",
       " (0, 0, 3, 0): {0: 1.0},\n",
       " (0, 0, 3, 1): {0: 1.0},\n",
       " (0, 0, 3, 2): {1: 1.0},\n",
       " (0, 0, 3, 3): {1: 1.0},\n",
       " (0, 0, 3, 4): {2: 1.0},\n",
       " (0, 0, 4, 0): {0: 1.0},\n",
       " (0, 0, 4, 1): {0: 1.0},\n",
       " (0, 0, 4, 2): {1: 1.0},\n",
       " (0, 0, 4, 3): {1: 1.0},\n",
       " (0, 0, 4, 4): {2: 1.0},\n",
       " (0, 0, 5, 0): {0: 1.0},\n",
       " (0, 0, 5, 1): {0: 1.0},\n",
       " (0, 0, 5, 2): {1: 1.0},\n",
       " (0, 0, 5, 3): {1: 1.0},\n",
       " (0, 0, 5, 4): {2: 1.0},\n",
       " (0, 0, 6, 0): {0: 1.0},\n",
       " (0, 0, 6, 1): {0: 1.0},\n",
       " (0, 0, 6, 2): {1: 1.0},\n",
       " (0, 0, 6, 3): {1: 1.0},\n",
       " (0, 0, 6, 4): {2: 1.0},\n",
       " (0, 0, 7, 0): {0: 1.0},\n",
       " (0, 0, 7, 1): {0: 1.0},\n",
       " (0, 0, 7, 2): {1: 1.0},\n",
       " (0, 0, 7, 3): {1: 1.0},\n",
       " (0, 0, 7, 4): {2: 1.0},\n",
       " (0, 0, 8, 0): {0: 1.0},\n",
       " (0, 0, 8, 1): {0: 1.0},\n",
       " (0, 0, 8, 2): {1: 1.0},\n",
       " (0, 0, 8, 3): {1: 1.0},\n",
       " (0, 0, 8, 4): {2: 1.0},\n",
       " (0, 0, 9, 0): {0: 1.0},\n",
       " (0, 0, 9, 1): {0: 1.0},\n",
       " (0, 0, 9, 2): {1: 1.0},\n",
       " (0, 0, 9, 3): {1: 1.0},\n",
       " (0, 0, 9, 4): {2: 1.0},\n",
       " (0, 0, 10, 0): {0: 1.0},\n",
       " (0, 0, 10, 1): {0: 1.0},\n",
       " (0, 0, 10, 2): {1: 1.0},\n",
       " (0, 0, 10, 3): {1: 1.0},\n",
       " (0, 0, 10, 4): {2: 1.0},\n",
       " (0, 0, 11, 0): {0: 1.0},\n",
       " (0, 0, 11, 1): {0: 1.0},\n",
       " (0, 0, 11, 2): {1: 1.0},\n",
       " (0, 0, 11, 3): {1: 1.0},\n",
       " (0, 0, 11, 4): {2: 1.0},\n",
       " (0, 0, 12, 0): {0: 1.0},\n",
       " (0, 0, 12, 1): {0: 1.0},\n",
       " (0, 0, 12, 2): {1: 1.0},\n",
       " (0, 0, 12, 3): {1: 1.0},\n",
       " (0, 0, 12, 4): {2: 1.0},\n",
       " (0, 0, 13, 0): {0: 1.0},\n",
       " (0, 0, 13, 1): {1: 1.0},\n",
       " (0, 0, 13, 2): {1: 1.0},\n",
       " (0, 0, 13, 3): {2: 1.0},\n",
       " (0, 0, 13, 4): {3: 1.0},\n",
       " (0, 0, 14, 0): {0: 1.0},\n",
       " (0, 0, 14, 1): {1: 1.0},\n",
       " (0, 0, 14, 2): {1: 1.0},\n",
       " (0, 0, 14, 3): {2: 1.0},\n",
       " (0, 0, 14, 4): {3: 1.0},\n",
       " (0, 0, 15, 0): {0: 1.0},\n",
       " (0, 0, 15, 1): {1: 1.0},\n",
       " (0, 0, 15, 2): {2: 1.0},\n",
       " (0, 0, 15, 3): {3: 1.0},\n",
       " (0, 0, 15, 4): {4: 1.0},\n",
       " (0, 0, 16, 0): {0: 1.0},\n",
       " (0, 0, 16, 1): {1: 1.0},\n",
       " (0, 0, 16, 2): {2: 1.0},\n",
       " (0, 0, 16, 3): {3: 1.0},\n",
       " (0, 0, 16, 4): {4: 1.0},\n",
       " (0, 0, 17, 0): {0: 1.0},\n",
       " (0, 0, 17, 1): {1: 1.0},\n",
       " (0, 0, 17, 2): {2: 1.0},\n",
       " (0, 0, 17, 3): {3: 1.0},\n",
       " (0, 0, 17, 4): {4: 1.0},\n",
       " (0, 0, 18, 0): {0: 1.0},\n",
       " (0, 0, 18, 1): {1: 1.0},\n",
       " (0, 0, 18, 2): {2: 1.0},\n",
       " (0, 0, 18, 3): {3: 1.0},\n",
       " (0, 0, 18, 4): {4: 1.0},\n",
       " (0, 0, 19, 0): {0: 1.0},\n",
       " (0, 0, 19, 1): {1: 1.0},\n",
       " (0, 0, 19, 2): {2: 1.0},\n",
       " (0, 0, 19, 3): {3: 1.0},\n",
       " (0, 0, 19, 4): {4: 1.0},\n",
       " (0, 0, 20, 0): {0: 1.0},\n",
       " (0, 0, 20, 1): {1: 1.0},\n",
       " (0, 0, 20, 2): {2: 1.0},\n",
       " (0, 0, 20, 3): {3: 1.0},\n",
       " (0, 0, 20, 4): {4: 1.0},\n",
       " (0, 0, 21, 0): {0: 1.0},\n",
       " (0, 0, 21, 1): {1: 1.0},\n",
       " (0, 0, 21, 2): {2: 1.0},\n",
       " (0, 0, 21, 3): {3: 1.0},\n",
       " (0, 0, 21, 4): {4: 1.0},\n",
       " (0, 0, 22, 0): {0: 1.0},\n",
       " (0, 0, 22, 1): {1: 1.0},\n",
       " (0, 0, 22, 2): {2: 1.0},\n",
       " (0, 0, 22, 3): {3: 1.0},\n",
       " (0, 0, 22, 4): {4: 1.0},\n",
       " (0, 0, 23, 0): {0: 1.0},\n",
       " (0, 0, 23, 1): {1: 1.0},\n",
       " (0, 0, 23, 2): {2: 1.0},\n",
       " (0, 0, 23, 3): {3: 1.0},\n",
       " (0, 0, 23, 4): {4: 1.0},\n",
       " (0, 0, 24, 0): {0: 1.0},\n",
       " (0, 0, 24, 1): {1: 1.0},\n",
       " (0, 0, 24, 2): {2: 1.0},\n",
       " (0, 0, 24, 3): {3: 1.0},\n",
       " (0, 0, 24, 4): {4: 1.0},\n",
       " (0, 0, 25, 0): {0: 1.0},\n",
       " (0, 0, 25, 1): {1: 1.0},\n",
       " (0, 0, 25, 2): {2: 1.0},\n",
       " (0, 0, 25, 3): {3: 1.0},\n",
       " (0, 0, 25, 4): {4: 1.0},\n",
       " (0, 0, 26, 0): {0: 1.0},\n",
       " (0, 0, 26, 1): {1: 1.0},\n",
       " (0, 0, 26, 2): {2: 1.0},\n",
       " (0, 0, 26, 3): {3: 1.0},\n",
       " (0, 0, 26, 4): {4: 1.0},\n",
       " (0, 0, 27, 0): {0: 1.0},\n",
       " (0, 0, 27, 1): {1: 1.0},\n",
       " (0, 0, 27, 2): {2: 1.0},\n",
       " (0, 0, 27, 3): {3: 1.0},\n",
       " (0, 0, 27, 4): {4: 1.0},\n",
       " (0, 0, 28, 0): {0: 1.0},\n",
       " (0, 0, 28, 1): {1: 1.0},\n",
       " (0, 0, 28, 2): {2: 1.0},\n",
       " (0, 0, 28, 3): {3: 1.0},\n",
       " (0, 0, 28, 4): {4: 1.0},\n",
       " (0, 0, 29, 0): {0: 1.0},\n",
       " (0, 0, 29, 1): {1: 1.0},\n",
       " (0, 0, 29, 2): {2: 1.0},\n",
       " (0, 0, 29, 3): {3: 1.0},\n",
       " (0, 0, 29, 4): {4: 1.0},\n",
       " (0, 0, 30, 0): {0: 1.0},\n",
       " (0, 0, 30, 1): {1: 1.0},\n",
       " (0, 0, 30, 2): {2: 1.0},\n",
       " (0, 0, 30, 3): {3: 1.0},\n",
       " (0, 0, 30, 4): {4: 1.0},\n",
       " (0, 0, 31, 0): {0: 1.0},\n",
       " (0, 0, 31, 1): {1: 1.0},\n",
       " (0, 0, 31, 2): {2: 1.0},\n",
       " (0, 0, 31, 3): {3: 1.0},\n",
       " (0, 0, 31, 4): {4: 1.0},\n",
       " (0, 0, 32, 0): {0: 1.0},\n",
       " (0, 0, 32, 1): {1: 1.0},\n",
       " (0, 0, 32, 2): {2: 1.0},\n",
       " (0, 0, 32, 3): {3: 1.0},\n",
       " (0, 0, 32, 4): {4: 1.0},\n",
       " (0, 0, 33, 0): {0: 1.0},\n",
       " (0, 0, 33, 1): {1: 1.0},\n",
       " (0, 0, 33, 2): {2: 1.0},\n",
       " (0, 0, 33, 3): {3: 1.0},\n",
       " (0, 0, 33, 4): {4: 1.0},\n",
       " (0, 0, 34, 0): {0: 1.0},\n",
       " (0, 0, 34, 1): {1: 1.0},\n",
       " (0, 0, 34, 2): {2: 1.0},\n",
       " (0, 0, 34, 3): {3: 1.0},\n",
       " (0, 0, 34, 4): {4: 1.0},\n",
       " (0, 0, 35, 0): {0: 1.0},\n",
       " (0, 0, 35, 1): {1: 1.0},\n",
       " (0, 0, 35, 2): {2: 1.0},\n",
       " (0, 0, 35, 3): {3: 1.0},\n",
       " (0, 0, 35, 4): {4: 1.0},\n",
       " (0, 1, 0, 0): {0: 1.0},\n",
       " (0, 1, 0, 1): {1: 1.0},\n",
       " (0, 1, 0, 2): {2: 1.0},\n",
       " (0, 1, 0, 3): {3: 1.0},\n",
       " (0, 1, 0, 4): {4: 1.0},\n",
       " (0, 1, 1, 0): {0: 1.0},\n",
       " (0, 1, 1, 1): {1: 1.0},\n",
       " (0, 1, 1, 2): {1: 1.0},\n",
       " (0, 1, 1, 3): {2: 1.0},\n",
       " (0, 1, 1, 4): {3: 1.0},\n",
       " (0, 1, 2, 0): {0: 1.0},\n",
       " (0, 1, 2, 1): {1: 1.0},\n",
       " (0, 1, 2, 2): {1: 1.0},\n",
       " (0, 1, 2, 3): {2: 1.0},\n",
       " (0, 1, 2, 4): {3: 1.0},\n",
       " (0, 1, 3, 0): {0: 1.0},\n",
       " (0, 1, 3, 1): {0: 1.0},\n",
       " (0, 1, 3, 2): {1: 1.0},\n",
       " (0, 1, 3, 3): {1: 1.0},\n",
       " (0, 1, 3, 4): {2: 1.0},\n",
       " (0, 1, 4, 0): {0: 1.0},\n",
       " (0, 1, 4, 1): {0: 1.0},\n",
       " (0, 1, 4, 2): {1: 1.0},\n",
       " (0, 1, 4, 3): {1: 1.0},\n",
       " (0, 1, 4, 4): {2: 1.0},\n",
       " (0, 1, 5, 0): {0: 1.0},\n",
       " (0, 1, 5, 1): {0: 1.0},\n",
       " (0, 1, 5, 2): {1: 1.0},\n",
       " (0, 1, 5, 3): {1: 1.0},\n",
       " (0, 1, 5, 4): {2: 1.0},\n",
       " (0, 1, 6, 0): {0: 1.0},\n",
       " (0, 1, 6, 1): {0: 1.0},\n",
       " (0, 1, 6, 2): {1: 1.0},\n",
       " (0, 1, 6, 3): {1: 1.0},\n",
       " (0, 1, 6, 4): {2: 1.0},\n",
       " (0, 1, 7, 0): {0: 1.0},\n",
       " (0, 1, 7, 1): {0: 1.0},\n",
       " (0, 1, 7, 2): {1: 1.0},\n",
       " (0, 1, 7, 3): {1: 1.0},\n",
       " (0, 1, 7, 4): {2: 1.0},\n",
       " (0, 1, 8, 0): {0: 1.0},\n",
       " (0, 1, 8, 1): {0: 1.0},\n",
       " (0, 1, 8, 2): {1: 1.0},\n",
       " (0, 1, 8, 3): {1: 1.0},\n",
       " (0, 1, 8, 4): {2: 1.0},\n",
       " (0, 1, 9, 0): {0: 1.0},\n",
       " (0, 1, 9, 1): {0: 1.0},\n",
       " (0, 1, 9, 2): {1: 1.0},\n",
       " (0, 1, 9, 3): {1: 1.0},\n",
       " (0, 1, 9, 4): {2: 1.0},\n",
       " (0, 1, 10, 0): {0: 1.0},\n",
       " (0, 1, 10, 1): {0: 1.0},\n",
       " (0, 1, 10, 2): {1: 1.0},\n",
       " (0, 1, 10, 3): {1: 1.0},\n",
       " (0, 1, 10, 4): {2: 1.0},\n",
       " (0, 1, 11, 0): {0: 1.0},\n",
       " (0, 1, 11, 1): {0: 1.0},\n",
       " (0, 1, 11, 2): {1: 1.0},\n",
       " (0, 1, 11, 3): {1: 1.0},\n",
       " (0, 1, 11, 4): {2: 1.0},\n",
       " (0, 1, 12, 0): {0: 1.0},\n",
       " (0, 1, 12, 1): {0: 1.0},\n",
       " (0, 1, 12, 2): {1: 1.0},\n",
       " (0, 1, 12, 3): {1: 1.0},\n",
       " (0, 1, 12, 4): {2: 1.0},\n",
       " (0, 1, 13, 0): {0: 1.0},\n",
       " (0, 1, 13, 1): {1: 1.0},\n",
       " (0, 1, 13, 2): {1: 1.0},\n",
       " (0, 1, 13, 3): {2: 1.0},\n",
       " (0, 1, 13, 4): {3: 1.0},\n",
       " (0, 1, 14, 0): {0: 1.0},\n",
       " (0, 1, 14, 1): {1: 1.0},\n",
       " (0, 1, 14, 2): {1: 1.0},\n",
       " (0, 1, 14, 3): {2: 1.0},\n",
       " (0, 1, 14, 4): {3: 1.0},\n",
       " (0, 1, 15, 0): {0: 1.0},\n",
       " (0, 1, 15, 1): {1: 1.0},\n",
       " (0, 1, 15, 2): {2: 1.0},\n",
       " (0, 1, 15, 3): {3: 1.0},\n",
       " (0, 1, 15, 4): {4: 1.0},\n",
       " (0, 1, 16, 0): {0: 1.0},\n",
       " (0, 1, 16, 1): {1: 1.0},\n",
       " (0, 1, 16, 2): {2: 1.0},\n",
       " (0, 1, 16, 3): {3: 1.0},\n",
       " (0, 1, 16, 4): {4: 1.0},\n",
       " (0, 1, 17, 0): {0: 1.0},\n",
       " (0, 1, 17, 1): {1: 1.0},\n",
       " (0, 1, 17, 2): {2: 1.0},\n",
       " (0, 1, 17, 3): {3: 1.0},\n",
       " (0, 1, 17, 4): {4: 1.0},\n",
       " (0, 1, 18, 0): {0: 1.0},\n",
       " (0, 1, 18, 1): {1: 1.0},\n",
       " (0, 1, 18, 2): {2: 1.0},\n",
       " (0, 1, 18, 3): {3: 1.0},\n",
       " (0, 1, 18, 4): {4: 1.0},\n",
       " (0, 1, 19, 0): {0: 1.0},\n",
       " (0, 1, 19, 1): {1: 1.0},\n",
       " (0, 1, 19, 2): {2: 1.0},\n",
       " (0, 1, 19, 3): {3: 1.0},\n",
       " (0, 1, 19, 4): {4: 1.0},\n",
       " (0, 1, 20, 0): {0: 1.0},\n",
       " (0, 1, 20, 1): {1: 1.0},\n",
       " (0, 1, 20, 2): {2: 1.0},\n",
       " (0, 1, 20, 3): {3: 1.0},\n",
       " (0, 1, 20, 4): {4: 1.0},\n",
       " (0, 1, 21, 0): {0: 1.0},\n",
       " (0, 1, 21, 1): {1: 1.0},\n",
       " (0, 1, 21, 2): {2: 1.0},\n",
       " (0, 1, 21, 3): {3: 1.0},\n",
       " (0, 1, 21, 4): {4: 1.0},\n",
       " (0, 1, 22, 0): {0: 1.0},\n",
       " (0, 1, 22, 1): {1: 1.0},\n",
       " (0, 1, 22, 2): {2: 1.0},\n",
       " (0, 1, 22, 3): {3: 1.0},\n",
       " (0, 1, 22, 4): {4: 1.0},\n",
       " (0, 1, 23, 0): {0: 1.0},\n",
       " (0, 1, 23, 1): {1: 1.0},\n",
       " (0, 1, 23, 2): {2: 1.0},\n",
       " (0, 1, 23, 3): {3: 1.0},\n",
       " (0, 1, 23, 4): {4: 1.0},\n",
       " (0, 1, 24, 0): {0: 1.0},\n",
       " (0, 1, 24, 1): {1: 1.0},\n",
       " (0, 1, 24, 2): {2: 1.0},\n",
       " (0, 1, 24, 3): {3: 1.0},\n",
       " (0, 1, 24, 4): {4: 1.0},\n",
       " (0, 1, 25, 0): {0: 1.0},\n",
       " (0, 1, 25, 1): {1: 1.0},\n",
       " (0, 1, 25, 2): {2: 1.0},\n",
       " (0, 1, 25, 3): {3: 1.0},\n",
       " (0, 1, 25, 4): {4: 1.0},\n",
       " (0, 1, 26, 0): {0: 1.0},\n",
       " (0, 1, 26, 1): {1: 1.0},\n",
       " (0, 1, 26, 2): {2: 1.0},\n",
       " (0, 1, 26, 3): {3: 1.0},\n",
       " (0, 1, 26, 4): {4: 1.0},\n",
       " (0, 1, 27, 0): {0: 1.0},\n",
       " (0, 1, 27, 1): {1: 1.0},\n",
       " (0, 1, 27, 2): {2: 1.0},\n",
       " (0, 1, 27, 3): {3: 1.0},\n",
       " (0, 1, 27, 4): {4: 1.0},\n",
       " (0, 1, 28, 0): {0: 1.0},\n",
       " (0, 1, 28, 1): {1: 1.0},\n",
       " (0, 1, 28, 2): {2: 1.0},\n",
       " (0, 1, 28, 3): {3: 1.0},\n",
       " (0, 1, 28, 4): {4: 1.0},\n",
       " (0, 1, 29, 0): {0: 1.0},\n",
       " (0, 1, 29, 1): {1: 1.0},\n",
       " (0, 1, 29, 2): {2: 1.0},\n",
       " (0, 1, 29, 3): {3: 1.0},\n",
       " (0, 1, 29, 4): {4: 1.0},\n",
       " (0, 1, 30, 0): {0: 1.0},\n",
       " (0, 1, 30, 1): {1: 1.0},\n",
       " (0, 1, 30, 2): {2: 1.0},\n",
       " (0, 1, 30, 3): {3: 1.0},\n",
       " (0, 1, 30, 4): {4: 1.0},\n",
       " (0, 1, 31, 0): {0: 1.0},\n",
       " (0, 1, 31, 1): {1: 1.0},\n",
       " (0, 1, 31, 2): {2: 1.0},\n",
       " (0, 1, 31, 3): {3: 1.0},\n",
       " (0, 1, 31, 4): {4: 1.0},\n",
       " (0, 1, 32, 0): {0: 1.0},\n",
       " (0, 1, 32, 1): {1: 1.0},\n",
       " (0, 1, 32, 2): {2: 1.0},\n",
       " (0, 1, 32, 3): {3: 1.0},\n",
       " (0, 1, 32, 4): {4: 1.0},\n",
       " (0, 1, 33, 0): {0: 1.0},\n",
       " (0, 1, 33, 1): {1: 1.0},\n",
       " (0, 1, 33, 2): {2: 1.0},\n",
       " (0, 1, 33, 3): {3: 1.0},\n",
       " (0, 1, 33, 4): {4: 1.0},\n",
       " (0, 1, 34, 0): {0: 1.0},\n",
       " (0, 1, 34, 1): {1: 1.0},\n",
       " (0, 1, 34, 2): {2: 1.0},\n",
       " (0, 1, 34, 3): {3: 1.0},\n",
       " (0, 1, 34, 4): {4: 1.0},\n",
       " (0, 1, 35, 0): {0: 1.0},\n",
       " (0, 1, 35, 1): {1: 1.0},\n",
       " (0, 1, 35, 2): {2: 1.0},\n",
       " (0, 1, 35, 3): {3: 1.0},\n",
       " (0, 1, 35, 4): {4: 1.0},\n",
       " (0, 2, 0, 0): {0: 1.0},\n",
       " (0, 2, 0, 1): {1: 1.0},\n",
       " (0, 2, 0, 2): {2: 1.0},\n",
       " (0, 2, 0, 3): {3: 1.0},\n",
       " (0, 2, 0, 4): {4: 1.0},\n",
       " (0, 2, 1, 0): {0: 1.0},\n",
       " (0, 2, 1, 1): {1: 1.0},\n",
       " (0, 2, 1, 2): {1: 1.0},\n",
       " (0, 2, 1, 3): {2: 1.0},\n",
       " (0, 2, 1, 4): {3: 1.0},\n",
       " (0, 2, 2, 0): {0: 1.0},\n",
       " (0, 2, 2, 1): {1: 1.0},\n",
       " (0, 2, 2, 2): {1: 1.0},\n",
       " (0, 2, 2, 3): {2: 1.0},\n",
       " (0, 2, 2, 4): {3: 1.0},\n",
       " (0, 2, 3, 0): {0: 1.0},\n",
       " (0, 2, 3, 1): {0: 1.0},\n",
       " (0, 2, 3, 2): {1: 1.0},\n",
       " (0, 2, 3, 3): {1: 1.0},\n",
       " (0, 2, 3, 4): {2: 1.0},\n",
       " (0, 2, 4, 0): {0: 1.0},\n",
       " (0, 2, 4, 1): {0: 1.0},\n",
       " (0, 2, 4, 2): {1: 1.0},\n",
       " (0, 2, 4, 3): {1: 1.0},\n",
       " (0, 2, 4, 4): {2: 1.0},\n",
       " (0, 2, 5, 0): {0: 1.0},\n",
       " (0, 2, 5, 1): {0: 1.0},\n",
       " (0, 2, 5, 2): {1: 1.0},\n",
       " (0, 2, 5, 3): {1: 1.0},\n",
       " (0, 2, 5, 4): {2: 1.0},\n",
       " (0, 2, 6, 0): {0: 1.0},\n",
       " (0, 2, 6, 1): {0: 1.0},\n",
       " (0, 2, 6, 2): {1: 1.0},\n",
       " (0, 2, 6, 3): {1: 1.0},\n",
       " (0, 2, 6, 4): {2: 1.0},\n",
       " (0, 2, 7, 0): {0: 1.0},\n",
       " (0, 2, 7, 1): {0: 1.0},\n",
       " (0, 2, 7, 2): {1: 1.0},\n",
       " (0, 2, 7, 3): {1: 1.0},\n",
       " (0, 2, 7, 4): {2: 1.0},\n",
       " (0, 2, 8, 0): {0: 1.0},\n",
       " (0, 2, 8, 1): {0: 1.0},\n",
       " (0, 2, 8, 2): {1: 1.0},\n",
       " (0, 2, 8, 3): {1: 1.0},\n",
       " (0, 2, 8, 4): {2: 1.0},\n",
       " (0, 2, 9, 0): {0: 1.0},\n",
       " (0, 2, 9, 1): {0: 1.0},\n",
       " (0, 2, 9, 2): {1: 1.0},\n",
       " (0, 2, 9, 3): {1: 1.0},\n",
       " (0, 2, 9, 4): {2: 1.0},\n",
       " (0, 2, 10, 0): {0: 1.0},\n",
       " (0, 2, 10, 1): {0: 1.0},\n",
       " (0, 2, 10, 2): {1: 1.0},\n",
       " (0, 2, 10, 3): {1: 1.0},\n",
       " (0, 2, 10, 4): {2: 1.0},\n",
       " (0, 2, 11, 0): {0: 1.0},\n",
       " (0, 2, 11, 1): {0: 1.0},\n",
       " (0, 2, 11, 2): {1: 1.0},\n",
       " (0, 2, 11, 3): {1: 1.0},\n",
       " (0, 2, 11, 4): {2: 1.0},\n",
       " (0, 2, 12, 0): {0: 1.0},\n",
       " (0, 2, 12, 1): {0: 1.0},\n",
       " (0, 2, 12, 2): {1: 1.0},\n",
       " (0, 2, 12, 3): {1: 1.0},\n",
       " (0, 2, 12, 4): {2: 1.0},\n",
       " (0, 2, 13, 0): {0: 1.0},\n",
       " (0, 2, 13, 1): {1: 1.0},\n",
       " (0, 2, 13, 2): {1: 1.0},\n",
       " (0, 2, 13, 3): {2: 1.0},\n",
       " (0, 2, 13, 4): {3: 1.0},\n",
       " (0, 2, 14, 0): {0: 1.0},\n",
       " (0, 2, 14, 1): {1: 1.0},\n",
       " (0, 2, 14, 2): {1: 1.0},\n",
       " (0, 2, 14, 3): {2: 1.0},\n",
       " (0, 2, 14, 4): {3: 1.0},\n",
       " (0, 2, 15, 0): {0: 1.0},\n",
       " (0, 2, 15, 1): {1: 1.0},\n",
       " (0, 2, 15, 2): {2: 1.0},\n",
       " (0, 2, 15, 3): {3: 1.0},\n",
       " (0, 2, 15, 4): {4: 1.0},\n",
       " (0, 2, 16, 0): {0: 1.0},\n",
       " (0, 2, 16, 1): {1: 1.0},\n",
       " (0, 2, 16, 2): {2: 1.0},\n",
       " (0, 2, 16, 3): {3: 1.0},\n",
       " (0, 2, 16, 4): {4: 1.0},\n",
       " (0, 2, 17, 0): {0: 1.0},\n",
       " (0, 2, 17, 1): {1: 1.0},\n",
       " (0, 2, 17, 2): {2: 1.0},\n",
       " (0, 2, 17, 3): {3: 1.0},\n",
       " (0, 2, 17, 4): {4: 1.0},\n",
       " (0, 2, 18, 0): {0: 1.0},\n",
       " (0, 2, 18, 1): {1: 1.0},\n",
       " (0, 2, 18, 2): {2: 1.0},\n",
       " (0, 2, 18, 3): {3: 1.0},\n",
       " (0, 2, 18, 4): {4: 1.0},\n",
       " (0, 2, 19, 0): {0: 1.0},\n",
       " (0, 2, 19, 1): {1: 1.0},\n",
       " (0, 2, 19, 2): {2: 1.0},\n",
       " (0, 2, 19, 3): {3: 1.0},\n",
       " (0, 2, 19, 4): {4: 1.0},\n",
       " (0, 2, 20, 0): {0: 1.0},\n",
       " (0, 2, 20, 1): {1: 1.0},\n",
       " (0, 2, 20, 2): {2: 1.0},\n",
       " (0, 2, 20, 3): {3: 1.0},\n",
       " (0, 2, 20, 4): {4: 1.0},\n",
       " (0, 2, 21, 0): {0: 1.0},\n",
       " (0, 2, 21, 1): {1: 1.0},\n",
       " (0, 2, 21, 2): {2: 1.0},\n",
       " (0, 2, 21, 3): {3: 1.0},\n",
       " (0, 2, 21, 4): {4: 1.0},\n",
       " (0, 2, 22, 0): {0: 1.0},\n",
       " (0, 2, 22, 1): {1: 1.0},\n",
       " (0, 2, 22, 2): {2: 1.0},\n",
       " (0, 2, 22, 3): {3: 1.0},\n",
       " (0, 2, 22, 4): {4: 1.0},\n",
       " (0, 2, 23, 0): {0: 1.0},\n",
       " (0, 2, 23, 1): {1: 1.0},\n",
       " (0, 2, 23, 2): {2: 1.0},\n",
       " (0, 2, 23, 3): {3: 1.0},\n",
       " (0, 2, 23, 4): {4: 1.0},\n",
       " (0, 2, 24, 0): {0: 1.0},\n",
       " (0, 2, 24, 1): {1: 1.0},\n",
       " (0, 2, 24, 2): {2: 1.0},\n",
       " (0, 2, 24, 3): {3: 1.0},\n",
       " (0, 2, 24, 4): {4: 1.0},\n",
       " (0, 2, 25, 0): {0: 1.0},\n",
       " (0, 2, 25, 1): {1: 1.0},\n",
       " (0, 2, 25, 2): {2: 1.0},\n",
       " (0, 2, 25, 3): {3: 1.0},\n",
       " (0, 2, 25, 4): {4: 1.0},\n",
       " (0, 2, 26, 0): {0: 1.0},\n",
       " (0, 2, 26, 1): {1: 1.0},\n",
       " (0, 2, 26, 2): {2: 1.0},\n",
       " (0, 2, 26, 3): {3: 1.0},\n",
       " (0, 2, 26, 4): {4: 1.0},\n",
       " (0, 2, 27, 0): {0: 1.0},\n",
       " (0, 2, 27, 1): {1: 1.0},\n",
       " (0, 2, 27, 2): {2: 1.0},\n",
       " (0, 2, 27, 3): {3: 1.0},\n",
       " (0, 2, 27, 4): {4: 1.0},\n",
       " (0, 2, 28, 0): {0: 1.0},\n",
       " (0, 2, 28, 1): {1: 1.0},\n",
       " (0, 2, 28, 2): {2: 1.0},\n",
       " (0, 2, 28, 3): {3: 1.0},\n",
       " (0, 2, 28, 4): {4: 1.0},\n",
       " (0, 2, 29, 0): {0: 1.0},\n",
       " (0, 2, 29, 1): {1: 1.0},\n",
       " (0, 2, 29, 2): {2: 1.0},\n",
       " (0, 2, 29, 3): {3: 1.0},\n",
       " (0, 2, 29, 4): {4: 1.0},\n",
       " (0, 2, 30, 0): {0: 1.0},\n",
       " (0, 2, 30, 1): {1: 1.0},\n",
       " (0, 2, 30, 2): {2: 1.0},\n",
       " (0, 2, 30, 3): {3: 1.0},\n",
       " (0, 2, 30, 4): {4: 1.0},\n",
       " (0, 2, 31, 0): {0: 1.0},\n",
       " (0, 2, 31, 1): {1: 1.0},\n",
       " (0, 2, 31, 2): {2: 1.0},\n",
       " (0, 2, 31, 3): {3: 1.0},\n",
       " (0, 2, 31, 4): {4: 1.0},\n",
       " (0, 2, 32, 0): {0: 1.0},\n",
       " (0, 2, 32, 1): {1: 1.0},\n",
       " (0, 2, 32, 2): {2: 1.0},\n",
       " (0, 2, 32, 3): {3: 1.0},\n",
       " (0, 2, 32, 4): {4: 1.0},\n",
       " (0, 2, 33, 0): {0: 1.0},\n",
       " (0, 2, 33, 1): {1: 1.0},\n",
       " (0, 2, 33, 2): {2: 1.0},\n",
       " (0, 2, 33, 3): {3: 1.0},\n",
       " (0, 2, 33, 4): {4: 1.0},\n",
       " (0, 2, 34, 0): {0: 1.0},\n",
       " (0, 2, 34, 1): {1: 1.0},\n",
       " (0, 2, 34, 2): {2: 1.0},\n",
       " (0, 2, 34, 3): {3: 1.0},\n",
       " (0, 2, 34, 4): {4: 1.0},\n",
       " (0, 2, 35, 0): {0: 1.0},\n",
       " (0, 2, 35, 1): {1: 1.0},\n",
       " (0, 2, 35, 2): {2: 1.0},\n",
       " (0, 2, 35, 3): {3: 1.0},\n",
       " (0, 2, 35, 4): {4: 1.0},\n",
       " (0, 3, 0, 0): {0: 1.0},\n",
       " (0, 3, 0, 1): {1: 1.0},\n",
       " (0, 3, 0, 2): {2: 1.0},\n",
       " (0, 3, 0, 3): {3: 1.0},\n",
       " (0, 3, 0, 4): {4: 1.0},\n",
       " (0, 3, 1, 0): {0: 1.0},\n",
       " (0, 3, 1, 1): {1: 1.0},\n",
       " (0, 3, 1, 2): {1: 1.0},\n",
       " (0, 3, 1, 3): {2: 1.0},\n",
       " (0, 3, 1, 4): {3: 1.0},\n",
       " (0, 3, 2, 0): {0: 1.0},\n",
       " (0, 3, 2, 1): {1: 1.0},\n",
       " (0, 3, 2, 2): {1: 1.0},\n",
       " (0, 3, 2, 3): {2: 1.0},\n",
       " (0, 3, 2, 4): {3: 1.0},\n",
       " (0, 3, 3, 0): {0: 1.0},\n",
       " (0, 3, 3, 1): {0: 1.0},\n",
       " (0, 3, 3, 2): {1: 1.0},\n",
       " (0, 3, 3, 3): {1: 1.0},\n",
       " (0, 3, 3, 4): {2: 1.0},\n",
       " (0, 3, 4, 0): {0: 1.0},\n",
       " (0, 3, 4, 1): {0: 1.0},\n",
       " (0, 3, 4, 2): {1: 1.0},\n",
       " (0, 3, 4, 3): {1: 1.0},\n",
       " (0, 3, 4, 4): {2: 1.0},\n",
       " (0, 3, 5, 0): {0: 1.0},\n",
       " (0, 3, 5, 1): {0: 1.0},\n",
       " (0, 3, 5, 2): {1: 1.0},\n",
       " (0, 3, 5, 3): {1: 1.0},\n",
       " (0, 3, 5, 4): {2: 1.0},\n",
       " (0, 3, 6, 0): {0: 1.0},\n",
       " (0, 3, 6, 1): {0: 1.0},\n",
       " (0, 3, 6, 2): {1: 1.0},\n",
       " (0, 3, 6, 3): {1: 1.0},\n",
       " (0, 3, 6, 4): {2: 1.0},\n",
       " (0, 3, 7, 0): {0: 1.0},\n",
       " (0, 3, 7, 1): {0: 1.0},\n",
       " (0, 3, 7, 2): {1: 1.0},\n",
       " (0, 3, 7, 3): {1: 1.0},\n",
       " (0, 3, 7, 4): {2: 1.0},\n",
       " (0, 3, 8, 0): {0: 1.0},\n",
       " (0, 3, 8, 1): {0: 1.0},\n",
       " (0, 3, 8, 2): {1: 1.0},\n",
       " (0, 3, 8, 3): {1: 1.0},\n",
       " (0, 3, 8, 4): {2: 1.0},\n",
       " (0, 3, 9, 0): {0: 1.0},\n",
       " (0, 3, 9, 1): {0: 1.0},\n",
       " (0, 3, 9, 2): {1: 1.0},\n",
       " (0, 3, 9, 3): {1: 1.0},\n",
       " (0, 3, 9, 4): {2: 1.0},\n",
       " (0, 3, 10, 0): {0: 1.0},\n",
       " (0, 3, 10, 1): {0: 1.0},\n",
       " (0, 3, 10, 2): {1: 1.0},\n",
       " (0, 3, 10, 3): {1: 1.0},\n",
       " (0, 3, 10, 4): {2: 1.0},\n",
       " (0, 3, 11, 0): {0: 1.0},\n",
       " (0, 3, 11, 1): {0: 1.0},\n",
       " (0, 3, 11, 2): {1: 1.0},\n",
       " (0, 3, 11, 3): {1: 1.0},\n",
       " (0, 3, 11, 4): {2: 1.0},\n",
       " (0, 3, 12, 0): {0: 1.0},\n",
       " (0, 3, 12, 1): {0: 1.0},\n",
       " (0, 3, 12, 2): {1: 1.0},\n",
       " (0, 3, 12, 3): {1: 1.0},\n",
       " (0, 3, 12, 4): {2: 1.0},\n",
       " (0, 3, 13, 0): {0: 1.0},\n",
       " (0, 3, 13, 1): {1: 1.0},\n",
       " (0, 3, 13, 2): {1: 1.0},\n",
       " (0, 3, 13, 3): {2: 1.0},\n",
       " (0, 3, 13, 4): {3: 1.0},\n",
       " (0, 3, 14, 0): {0: 1.0},\n",
       " (0, 3, 14, 1): {1: 1.0},\n",
       " (0, 3, 14, 2): {1: 1.0},\n",
       " (0, 3, 14, 3): {2: 1.0},\n",
       " (0, 3, 14, 4): {3: 1.0},\n",
       " (0, 3, 15, 0): {0: 1.0},\n",
       " (0, 3, 15, 1): {1: 1.0},\n",
       " (0, 3, 15, 2): {2: 1.0},\n",
       " (0, 3, 15, 3): {3: 1.0},\n",
       " (0, 3, 15, 4): {4: 1.0},\n",
       " (0, 3, 16, 0): {0: 1.0},\n",
       " (0, 3, 16, 1): {1: 1.0},\n",
       " (0, 3, 16, 2): {2: 1.0},\n",
       " (0, 3, 16, 3): {3: 1.0},\n",
       " (0, 3, 16, 4): {4: 1.0},\n",
       " (0, 3, 17, 0): {0: 1.0},\n",
       " (0, 3, 17, 1): {1: 1.0},\n",
       " (0, 3, 17, 2): {2: 1.0},\n",
       " (0, 3, 17, 3): {3: 1.0},\n",
       " (0, 3, 17, 4): {4: 1.0},\n",
       " (0, 3, 18, 0): {0: 1.0},\n",
       " (0, 3, 18, 1): {1: 1.0},\n",
       " (0, 3, 18, 2): {2: 1.0},\n",
       " (0, 3, 18, 3): {3: 1.0},\n",
       " (0, 3, 18, 4): {4: 1.0},\n",
       " (0, 3, 19, 0): {0: 1.0},\n",
       " (0, 3, 19, 1): {1: 1.0},\n",
       " (0, 3, 19, 2): {2: 1.0},\n",
       " (0, 3, 19, 3): {3: 1.0},\n",
       " (0, 3, 19, 4): {4: 1.0},\n",
       " (0, 3, 20, 0): {0: 1.0},\n",
       " (0, 3, 20, 1): {1: 1.0},\n",
       " (0, 3, 20, 2): {2: 1.0},\n",
       " (0, 3, 20, 3): {3: 1.0},\n",
       " (0, 3, 20, 4): {4: 1.0},\n",
       " (0, 3, 21, 0): {0: 1.0},\n",
       " (0, 3, 21, 1): {1: 1.0},\n",
       " (0, 3, 21, 2): {2: 1.0},\n",
       " (0, 3, 21, 3): {3: 1.0},\n",
       " (0, 3, 21, 4): {4: 1.0},\n",
       " (0, 3, 22, 0): {0: 1.0},\n",
       " (0, 3, 22, 1): {1: 1.0},\n",
       " (0, 3, 22, 2): {2: 1.0},\n",
       " (0, 3, 22, 3): {3: 1.0},\n",
       " (0, 3, 22, 4): {4: 1.0},\n",
       " (0, 3, 23, 0): {0: 1.0},\n",
       " (0, 3, 23, 1): {1: 1.0},\n",
       " (0, 3, 23, 2): {2: 1.0},\n",
       " (0, 3, 23, 3): {3: 1.0},\n",
       " (0, 3, 23, 4): {4: 1.0},\n",
       " (0, 3, 24, 0): {0: 1.0},\n",
       " (0, 3, 24, 1): {1: 1.0},\n",
       " (0, 3, 24, 2): {2: 1.0},\n",
       " (0, 3, 24, 3): {3: 1.0},\n",
       " (0, 3, 24, 4): {4: 1.0},\n",
       " (0, 3, 25, 0): {0: 1.0},\n",
       " (0, 3, 25, 1): {1: 1.0},\n",
       " (0, 3, 25, 2): {2: 1.0},\n",
       " (0, 3, 25, 3): {3: 1.0},\n",
       " (0, 3, 25, 4): {4: 1.0},\n",
       " (0, 3, 26, 0): {0: 1.0},\n",
       " (0, 3, 26, 1): {1: 1.0},\n",
       " (0, 3, 26, 2): {2: 1.0},\n",
       " (0, 3, 26, 3): {3: 1.0},\n",
       " (0, 3, 26, 4): {4: 1.0},\n",
       " (0, 3, 27, 0): {0: 1.0},\n",
       " (0, 3, 27, 1): {1: 1.0},\n",
       " (0, 3, 27, 2): {2: 1.0},\n",
       " (0, 3, 27, 3): {3: 1.0},\n",
       " (0, 3, 27, 4): {4: 1.0},\n",
       " (0, 3, 28, 0): {0: 1.0},\n",
       " (0, 3, 28, 1): {1: 1.0},\n",
       " (0, 3, 28, 2): {2: 1.0},\n",
       " (0, 3, 28, 3): {3: 1.0},\n",
       " (0, 3, 28, 4): {4: 1.0},\n",
       " (0, 3, 29, 0): {0: 1.0},\n",
       " (0, 3, 29, 1): {1: 1.0},\n",
       " (0, 3, 29, 2): {2: 1.0},\n",
       " (0, 3, 29, 3): {3: 1.0},\n",
       " (0, 3, 29, 4): {4: 1.0},\n",
       " (0, 3, 30, 0): {0: 1.0},\n",
       " (0, 3, 30, 1): {1: 1.0},\n",
       " (0, 3, 30, 2): {2: 1.0},\n",
       " (0, 3, 30, 3): {3: 1.0},\n",
       " (0, 3, 30, 4): {4: 1.0},\n",
       " (0, 3, 31, 0): {0: 1.0},\n",
       " (0, 3, 31, 1): {1: 1.0},\n",
       " (0, 3, 31, 2): {2: 1.0},\n",
       " (0, 3, 31, 3): {3: 1.0},\n",
       " (0, 3, 31, 4): {4: 1.0},\n",
       " (0, 3, 32, 0): {0: 1.0},\n",
       " (0, 3, 32, 1): {1: 1.0},\n",
       " (0, 3, 32, 2): {2: 1.0},\n",
       " (0, 3, 32, 3): {3: 1.0},\n",
       " (0, 3, 32, 4): {4: 1.0},\n",
       " (0, 3, 33, 0): {0: 1.0},\n",
       " (0, 3, 33, 1): {1: 1.0},\n",
       " (0, 3, 33, 2): {2: 1.0},\n",
       " (0, 3, 33, 3): {3: 1.0},\n",
       " (0, 3, 33, 4): {4: 1.0},\n",
       " (0, 3, 34, 0): {0: 1.0},\n",
       " (0, 3, 34, 1): {1: 1.0},\n",
       " (0, 3, 34, 2): {2: 1.0},\n",
       " (0, 3, 34, 3): {3: 1.0},\n",
       " (0, 3, 34, 4): {4: 1.0},\n",
       " (0, 3, 35, 0): {0: 1.0},\n",
       " (0, 3, 35, 1): {1: 1.0},\n",
       " (0, 3, 35, 2): {2: 1.0},\n",
       " (0, 3, 35, 3): {3: 1.0},\n",
       " (0, 3, 35, 4): {4: 1.0},\n",
       " (0, 4, 0, 0): {0: 1.0},\n",
       " (0, 4, 0, 1): {1: 1.0},\n",
       " (0, 4, 0, 2): {2: 1.0},\n",
       " (0, 4, 0, 3): {3: 1.0},\n",
       " (0, 4, 0, 4): {4: 1.0},\n",
       " (0, 4, 1, 0): {0: 1.0},\n",
       " (0, 4, 1, 1): {1: 1.0},\n",
       " (0, 4, 1, 2): {1: 1.0},\n",
       " (0, 4, 1, 3): {2: 1.0},\n",
       " (0, 4, 1, 4): {3: 1.0},\n",
       " (0, 4, 2, 0): {0: 1.0},\n",
       " (0, 4, 2, 1): {1: 1.0},\n",
       " (0, 4, 2, 2): {1: 1.0},\n",
       " (0, 4, 2, 3): {2: 1.0},\n",
       " (0, 4, 2, 4): {3: 1.0},\n",
       " (0, 4, 3, 0): {0: 1.0},\n",
       " (0, 4, 3, 1): {0: 1.0},\n",
       " (0, 4, 3, 2): {1: 1.0},\n",
       " (0, 4, 3, 3): {1: 1.0},\n",
       " (0, 4, 3, 4): {2: 1.0},\n",
       " (0, 4, 4, 0): {0: 1.0},\n",
       " (0, 4, 4, 1): {0: 1.0},\n",
       " (0, 4, 4, 2): {1: 1.0},\n",
       " (0, 4, 4, 3): {1: 1.0},\n",
       " (0, 4, 4, 4): {2: 1.0},\n",
       " (0, 4, 5, 0): {0: 1.0},\n",
       " (0, 4, 5, 1): {0: 1.0},\n",
       " (0, 4, 5, 2): {1: 1.0},\n",
       " (0, 4, 5, 3): {1: 1.0},\n",
       " (0, 4, 5, 4): {2: 1.0},\n",
       " (0, 4, 6, 0): {0: 1.0},\n",
       " (0, 4, 6, 1): {0: 1.0},\n",
       " (0, 4, 6, 2): {1: 1.0},\n",
       " (0, 4, 6, 3): {1: 1.0},\n",
       " (0, 4, 6, 4): {2: 1.0},\n",
       " (0, 4, 7, 0): {0: 1.0},\n",
       " (0, 4, 7, 1): {0: 1.0},\n",
       " (0, 4, 7, 2): {1: 1.0},\n",
       " (0, 4, 7, 3): {1: 1.0},\n",
       " (0, 4, 7, 4): {2: 1.0},\n",
       " (0, 4, 8, 0): {0: 1.0},\n",
       " (0, 4, 8, 1): {0: 1.0},\n",
       " (0, 4, 8, 2): {1: 1.0},\n",
       " (0, 4, 8, 3): {1: 1.0},\n",
       " (0, 4, 8, 4): {2: 1.0},\n",
       " (0, 4, 9, 0): {0: 1.0},\n",
       " (0, 4, 9, 1): {0: 1.0},\n",
       " (0, 4, 9, 2): {1: 1.0},\n",
       " (0, 4, 9, 3): {1: 1.0},\n",
       " (0, 4, 9, 4): {2: 1.0},\n",
       " (0, 4, 10, 0): {0: 1.0},\n",
       " (0, 4, 10, 1): {0: 1.0},\n",
       " (0, 4, 10, 2): {1: 1.0},\n",
       " (0, 4, 10, 3): {1: 1.0},\n",
       " (0, 4, 10, 4): {2: 1.0},\n",
       " (0, 4, 11, 0): {0: 1.0},\n",
       " (0, 4, 11, 1): {0: 1.0},\n",
       " (0, 4, 11, 2): {1: 1.0},\n",
       " (0, 4, 11, 3): {1: 1.0},\n",
       " (0, 4, 11, 4): {2: 1.0},\n",
       " (0, 4, 12, 0): {0: 1.0},\n",
       " (0, 4, 12, 1): {0: 1.0},\n",
       " (0, 4, 12, 2): {1: 1.0},\n",
       " (0, 4, 12, 3): {1: 1.0},\n",
       " (0, 4, 12, 4): {2: 1.0},\n",
       " (0, 4, 13, 0): {0: 1.0},\n",
       " (0, 4, 13, 1): {1: 1.0},\n",
       " (0, 4, 13, 2): {1: 1.0},\n",
       " (0, 4, 13, 3): {2: 1.0},\n",
       " (0, 4, 13, 4): {3: 1.0},\n",
       " (0, 4, 14, 0): {0: 1.0},\n",
       " (0, 4, 14, 1): {1: 1.0},\n",
       " (0, 4, 14, 2): {1: 1.0},\n",
       " (0, 4, 14, 3): {2: 1.0},\n",
       " (0, 4, 14, 4): {3: 1.0},\n",
       " (0, 4, 15, 0): {0: 1.0},\n",
       " (0, 4, 15, 1): {1: 1.0},\n",
       " (0, 4, 15, 2): {2: 1.0},\n",
       " (0, 4, 15, 3): {3: 1.0},\n",
       " (0, 4, 15, 4): {4: 1.0},\n",
       " (0, 4, 16, 0): {0: 1.0},\n",
       " (0, 4, 16, 1): {1: 1.0},\n",
       " (0, 4, 16, 2): {2: 1.0},\n",
       " (0, 4, 16, 3): {3: 1.0},\n",
       " (0, 4, 16, 4): {4: 1.0},\n",
       " (0, 4, 17, 0): {0: 1.0},\n",
       " (0, 4, 17, 1): {1: 1.0},\n",
       " (0, 4, 17, 2): {2: 1.0},\n",
       " (0, 4, 17, 3): {3: 1.0},\n",
       " (0, 4, 17, 4): {4: 1.0},\n",
       " (0, 4, 18, 0): {0: 1.0},\n",
       " (0, 4, 18, 1): {1: 1.0},\n",
       " (0, 4, 18, 2): {2: 1.0},\n",
       " (0, 4, 18, 3): {3: 1.0},\n",
       " (0, 4, 18, 4): {4: 1.0},\n",
       " (0, 4, 19, 0): {0: 1.0},\n",
       " (0, 4, 19, 1): {1: 1.0},\n",
       " (0, 4, 19, 2): {2: 1.0},\n",
       " (0, 4, 19, 3): {3: 1.0},\n",
       " (0, 4, 19, 4): {4: 1.0},\n",
       " (0, 4, 20, 0): {0: 1.0},\n",
       " (0, 4, 20, 1): {1: 1.0},\n",
       " (0, 4, 20, 2): {2: 1.0},\n",
       " (0, 4, 20, 3): {3: 1.0},\n",
       " (0, 4, 20, 4): {4: 1.0},\n",
       " (0, 4, 21, 0): {0: 1.0},\n",
       " (0, 4, 21, 1): {1: 1.0},\n",
       " (0, 4, 21, 2): {2: 1.0},\n",
       " (0, 4, 21, 3): {3: 1.0},\n",
       " (0, 4, 21, 4): {4: 1.0},\n",
       " (0, 4, 22, 0): {0: 1.0},\n",
       " (0, 4, 22, 1): {1: 1.0},\n",
       " (0, 4, 22, 2): {2: 1.0},\n",
       " (0, 4, 22, 3): {3: 1.0},\n",
       " (0, 4, 22, 4): {4: 1.0},\n",
       " (0, 4, 23, 0): {0: 1.0},\n",
       " (0, 4, 23, 1): {1: 1.0},\n",
       " (0, 4, 23, 2): {2: 1.0},\n",
       " (0, 4, 23, 3): {3: 1.0},\n",
       " (0, 4, 23, 4): {4: 1.0},\n",
       " (0, 4, 24, 0): {0: 1.0},\n",
       " (0, 4, 24, 1): {1: 1.0},\n",
       " (0, 4, 24, 2): {2: 1.0},\n",
       " (0, 4, 24, 3): {3: 1.0},\n",
       " (0, 4, 24, 4): {4: 1.0},\n",
       " (0, 4, 25, 0): {0: 1.0},\n",
       " (0, 4, 25, 1): {1: 1.0},\n",
       " (0, 4, 25, 2): {2: 1.0},\n",
       " (0, 4, 25, 3): {3: 1.0},\n",
       " (0, 4, 25, 4): {4: 1.0},\n",
       " (0, 4, 26, 0): {0: 1.0},\n",
       " (0, 4, 26, 1): {1: 1.0},\n",
       " (0, 4, 26, 2): {2: 1.0},\n",
       " (0, 4, 26, 3): {3: 1.0},\n",
       " (0, 4, 26, 4): {4: 1.0},\n",
       " (0, 4, 27, 0): {0: 1.0},\n",
       " (0, 4, 27, 1): {1: 1.0},\n",
       " (0, 4, 27, 2): {2: 1.0},\n",
       " (0, 4, 27, 3): {3: 1.0},\n",
       " (0, 4, 27, 4): {4: 1.0},\n",
       " (0, 4, 28, 0): {0: 1.0},\n",
       " (0, 4, 28, 1): {1: 1.0},\n",
       " (0, 4, 28, 2): {2: 1.0},\n",
       " (0, 4, 28, 3): {3: 1.0},\n",
       " (0, 4, 28, 4): {4: 1.0},\n",
       " (0, 4, 29, 0): {0: 1.0},\n",
       " (0, 4, 29, 1): {1: 1.0},\n",
       " (0, 4, 29, 2): {2: 1.0},\n",
       " (0, 4, 29, 3): {3: 1.0},\n",
       " (0, 4, 29, 4): {4: 1.0},\n",
       " (0, 4, 30, 0): {0: 1.0},\n",
       " (0, 4, 30, 1): {1: 1.0},\n",
       " (0, 4, 30, 2): {2: 1.0},\n",
       " (0, 4, 30, 3): {3: 1.0},\n",
       " (0, 4, 30, 4): {4: 1.0},\n",
       " (0, 4, 31, 0): {0: 1.0},\n",
       " (0, 4, 31, 1): {1: 1.0},\n",
       " (0, 4, 31, 2): {2: 1.0},\n",
       " (0, 4, 31, 3): {3: 1.0},\n",
       " (0, 4, 31, 4): {4: 1.0},\n",
       " (0, 4, 32, 0): {0: 1.0},\n",
       " (0, 4, 32, 1): {1: 1.0},\n",
       " (0, 4, 32, 2): {2: 1.0},\n",
       " (0, 4, 32, 3): {3: 1.0},\n",
       " (0, 4, 32, 4): {4: 1.0},\n",
       " (0, 4, 33, 0): {0: 1.0},\n",
       " (0, 4, 33, 1): {1: 1.0},\n",
       " (0, 4, 33, 2): {2: 1.0},\n",
       " (0, 4, 33, 3): {3: 1.0},\n",
       " (0, 4, 33, 4): {4: 1.0},\n",
       " (0, 4, 34, 0): {0: 1.0},\n",
       " (0, 4, 34, 1): {1: 1.0},\n",
       " (0, 4, 34, 2): {2: 1.0},\n",
       " (0, 4, 34, 3): {3: 1.0},\n",
       " (0, 4, 34, 4): {4: 1.0},\n",
       " (0, 4, 35, 0): {0: 1.0},\n",
       " (0, 4, 35, 1): {1: 1.0},\n",
       " (0, 4, 35, 2): {2: 1.0},\n",
       " (0, 4, 35, 3): {3: 1.0},\n",
       " (0, 4, 35, 4): {4: 1.0},\n",
       " (0, 5, 0, 0): {0: 1.0},\n",
       " (0, 5, 0, 1): {1: 1.0},\n",
       " (0, 5, 0, 2): {1: 1.0},\n",
       " (0, 5, 0, 3): {2: 1.0},\n",
       " (0, 5, 0, 4): {3: 1.0},\n",
       " (0, 5, 1, 0): {0: 1.0},\n",
       " (0, 5, 1, 1): {1: 1.0},\n",
       " (0, 5, 1, 2): {1: 1.0},\n",
       " (0, 5, 1, 3): {2: 1.0},\n",
       " (0, 5, 1, 4): {3: 1.0},\n",
       " (0, 5, 2, 0): {0: 1.0},\n",
       " (0, 5, 2, 1): {1: 1.0},\n",
       " (0, 5, 2, 2): {1: 1.0},\n",
       " (0, 5, 2, 3): {2: 1.0},\n",
       " (0, 5, 2, 4): {3: 1.0},\n",
       " (0, 5, 3, 0): {0: 1.0},\n",
       " (0, 5, 3, 1): {0: 1.0},\n",
       " (0, 5, 3, 2): {1: 1.0},\n",
       " (0, 5, 3, 3): {1: 1.0},\n",
       " (0, 5, 3, 4): {2: 1.0},\n",
       " (0, 5, 4, 0): {0: 1.0},\n",
       " (0, 5, 4, 1): {0: 1.0},\n",
       " (0, 5, 4, 2): {1: 1.0},\n",
       " (0, 5, 4, 3): {1: 1.0},\n",
       " (0, 5, 4, 4): {2: 1.0},\n",
       " (0, 5, 5, 0): {0: 1.0},\n",
       " (0, 5, 5, 1): {0: 1.0},\n",
       " (0, 5, 5, 2): {1: 1.0},\n",
       " (0, 5, 5, 3): {1: 1.0},\n",
       " (0, 5, 5, 4): {2: 1.0},\n",
       " (0, 5, 6, 0): {0: 1.0},\n",
       " (0, 5, 6, 1): {0: 1.0},\n",
       " (0, 5, 6, 2): {1: 1.0},\n",
       " (0, 5, 6, 3): {1: 1.0},\n",
       " (0, 5, 6, 4): {2: 1.0},\n",
       " (0, 5, 7, 0): {0: 1.0},\n",
       " (0, 5, 7, 1): {0: 1.0},\n",
       " (0, 5, 7, 2): {1: 1.0},\n",
       " (0, 5, 7, 3): {1: 1.0},\n",
       " (0, 5, 7, 4): {2: 1.0},\n",
       " (0, 5, 8, 0): {0: 1.0},\n",
       " (0, 5, 8, 1): {0: 1.0},\n",
       " (0, 5, 8, 2): {1: 1.0},\n",
       " (0, 5, 8, 3): {1: 1.0},\n",
       " (0, 5, 8, 4): {2: 1.0},\n",
       " (0, 5, 9, 0): {0: 1.0},\n",
       " (0, 5, 9, 1): {0: 1.0},\n",
       " (0, 5, 9, 2): {1: 1.0},\n",
       " (0, 5, 9, 3): {1: 1.0},\n",
       " (0, 5, 9, 4): {2: 1.0},\n",
       " (0, 5, 10, 0): {0: 1.0},\n",
       " (0, 5, 10, 1): {0: 1.0},\n",
       " (0, 5, 10, 2): {1: 1.0},\n",
       " (0, 5, 10, 3): {1: 1.0},\n",
       " (0, 5, 10, 4): {2: 1.0},\n",
       " (0, 5, 11, 0): {0: 1.0},\n",
       " (0, 5, 11, 1): {0: 1.0},\n",
       " (0, 5, 11, 2): {1: 1.0},\n",
       " (0, 5, 11, 3): {1: 1.0},\n",
       " (0, 5, 11, 4): {2: 1.0},\n",
       " (0, 5, 12, 0): {0: 1.0},\n",
       " (0, 5, 12, 1): {1: 1.0},\n",
       " (0, 5, 12, 2): {1: 1.0},\n",
       " (0, 5, 12, 3): {2: 1.0},\n",
       " (0, 5, 12, 4): {3: 1.0},\n",
       " (0, 5, 13, 0): {0: 1.0},\n",
       " (0, 5, 13, 1): {1: 1.0},\n",
       " (0, 5, 13, 2): {1: 1.0},\n",
       " (0, 5, 13, 3): {2: 1.0},\n",
       " (0, 5, 13, 4): {3: 1.0},\n",
       " (0, 5, 14, 0): {0: 1.0},\n",
       " (0, 5, 14, 1): {1: 1.0},\n",
       " (0, 5, 14, 2): {1: 1.0},\n",
       " (0, 5, 14, 3): {2: 1.0},\n",
       " (0, 5, 14, 4): {3: 1.0},\n",
       " (0, 5, 15, 0): {0: 1.0},\n",
       " (0, 5, 15, 1): {1: 1.0},\n",
       " (0, 5, 15, 2): {2: 1.0},\n",
       " (0, 5, 15, 3): {3: 1.0},\n",
       " (0, 5, 15, 4): {4: 1.0},\n",
       " (0, 5, 16, 0): {0: 1.0},\n",
       " (0, 5, 16, 1): {1: 1.0},\n",
       " (0, 5, 16, 2): {2: 1.0},\n",
       " (0, 5, 16, 3): {3: 1.0},\n",
       " (0, 5, 16, 4): {4: 1.0},\n",
       " (0, 5, 17, 0): {0: 1.0},\n",
       " (0, 5, 17, 1): {1: 1.0},\n",
       " (0, 5, 17, 2): {2: 1.0},\n",
       " (0, 5, 17, 3): {3: 1.0},\n",
       " (0, 5, 17, 4): {4: 1.0},\n",
       " (0, 5, 18, 0): {0: 1.0},\n",
       " (0, 5, 18, 1): {1: 1.0},\n",
       " (0, 5, 18, 2): {2: 1.0},\n",
       " (0, 5, 18, 3): {3: 1.0},\n",
       " (0, 5, 18, 4): {4: 1.0},\n",
       " (0, 5, 19, 0): {0: 1.0},\n",
       " (0, 5, 19, 1): {1: 1.0},\n",
       " (0, 5, 19, 2): {2: 1.0},\n",
       " (0, 5, 19, 3): {3: 1.0},\n",
       " (0, 5, 19, 4): {4: 1.0},\n",
       " ...}"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dp.obs_sigma_transition_probs ###beliefdp5obssigma"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
